<template>
<div>
  <h2>我是App组件:{{count}}</h2>
  <Child @changeCount="changeCount"></Child>
</div>
</template>


<script>
import Child from "@/components/Child";
export default {
    name:"App",
  components: {Child},
  data(){
    return{
      count:0,
    }
  },
  methods:{
      changeCount(value){
        this.count += value
      }
  }
}
</script>


<style></style>